#pragma once
#include <memory>
#include <map>

namespace rtdev {
class RtRobot;
}

namespace axisgroup {

class Robot;

class AxisGroupMgr
{
public:
    static AxisGroupMgr& instance()
    {
        static AxisGroupMgr instance;
        return instance;
    }
    int add_axisgroup(std::shared_ptr<Robot> group, std::shared_ptr<rtdev::RtRobot> rtrobot = nullptr);
    int del_axisgroup(uint8_t group_id);
    std::shared_ptr<Robot> get_axisgroup(uint8_t group_id);
    void reset();
    size_t group_num();

private:
    std::map<uint8_t, std::shared_ptr<Robot>> axis_group_;
};
}  // namespace axisgroup
